﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit" />
    <title>欢迎登录管理平台</title>
    <link href="css/Admin/login.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.11.2.min.js"></script>
    <script src="css/Admin/cloud.js" type="text/javascript"></script>
    <script src="Scripts/SZHLCommon.js" type="text/javascript"></script>
    <script type="text/javascript">

        $(function () {
            $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            $(window).resize(function () {
                $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            })
            if (top != self) {
                if (top.location != self.location)
                    top.location = self.location;
            }
            $("#username").val(ComFunJS.getCookie('username'))

            $(".loginbtn").click(function (e) {
                e.preventDefault();
                $(".loginbtn").text("正在登陆")
                $.getJSON('/API/SZHLAPI.ashx?Action=LOGIN', { "password": $("#userpasd").val(), "UserName": $("#username").val() }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        ComFunJS.setCookie('szhlcode', resultData.Result);
                        location.href = "NewIndex.html?ver=" + ComFunJS.getnowdate("yyyy-mm-dd");
                        if ($("#isJZMM")[0].checked) {
                            ComFunJS.setCookie('username', $("#username").val(), 2000)
                        } else {
                            ComFunJS.delCookie('username')
                        }
                    } else {
                        alert(resultData.ErrorMsg);
                        $(".loginbtn").text("登录")
                    }
                })
            });

        });


        function jptj(event) {
            if (event.keyCode == 13 || event.keyCode == 10) {
                $(".loginbtn").trigger('click');
            }
        }
    </script>
</head>
<body onkeypress="jptj(event)" style="background-color: #1c77ac; background-image: url(images/Login/light.png); background-repeat: no-repeat; background-position: center top; overflow: hidden;">
    <div id="mainBody">
        <div id="cloud1" class="cloud"></div>
        <div id="cloud2" class="cloud"></div>
    </div>

    <div class="logintop">
        <span>欢迎登录平台</span>
        <ul></ul>
    </div>
    <div class="loginbody">
        <span class="systemlogo" style="visibility: collapse"></span>
        <div class="loginbox">
            <ul>
                <li>
                    <input id="username" type="text" class="loginuser" autocomplete='off' />
                </li>
                <li>
                    <input id="userpasd" type="password" class="loginpwd" autocomplete='off' />
                </li>
                <li>
                    <button class="loginbtn">登录</button>
                    <label for="isJZMM">
                        <input type="checkbox" id="isJZMM" checked="checked" style="margin-right: 0; vertical-align: middle" />
                        记住账户
                    </label>
                </li>
            </ul>

        </div>
    </div>
    <div class="loginbm">版权所有<span id="bowversion"></span></div>
</body>
</html>
